$(document).ready(function(){
	MenuSubOpc($('#mnu-selected').attr('val'));
	
	$('#submit').click(function(){
		if(confirm('La informacion es correcta?') == false){return false;}
		else $('#form').submit();
	});
	
	$("#tip[title]").tooltip({
		position: "top center",
		opacity: 0.8,
		effect:  'fade',
		delay: 500,
		onShow: function() {
			this.getTrigger().fadeTo("slow", 0.4);
		}
	});
	
});

function MenuSubOpc(id){
	if($("#"+id).css("display") == "none")
		$('#'+id).slideDown('slow');
	else
		$('#'+id).slideUp('slow');
}